package org.libraq.hrm.feign;

import org.libraq.hrm.fallback.LoginFeignFallbackFactory;
import org.libraq.hrm.to.LoginMealTo;
import org.libraq.hrm.to.LoginTo;
import org.libraq.hrm.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "auth-server", fallbackFactory = LoginFeignFallbackFactory.class)
public interface LoginFeignClient  {

    @RequestMapping(value="/login/save",method= RequestMethod.POST)
    AjaxResult save(@RequestBody LoginTo to);

    @RequestMapping(value="/meal/saveLoginMeal",method= RequestMethod.POST)
    AjaxResult saveLoginMeal(@RequestBody LoginMealTo to);
}
